package ai.people.netmon.framework.annotation;

import ai.people.netmon.framework.businessenum.SensitiveTypeEnum;
import com.baomidou.mybatisplus.core.toolkit.StringPool;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 脱敏注解
 *
 * @author yuanqinglong
 * @date 2022/4/29 11:45
 */
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Desensitized {

    /**
     * 脱敏类型
     *
     * @return {@link SensitiveTypeEnum}
     */
    SensitiveTypeEnum type() default SensitiveTypeEnum.MOBILE_PHONE;

    /**
     * 脱敏符号
     *
     * @return {@link String}
     */
    String symbol() default StringPool.ASTERISK;
}
